#include "bsp_beep.h"
#include "bsp_gpio.h"


/*初始化IO*/
void beep_init(void){
    gpio_pin_config_t GPIO5_IO01_config;
    GPIO5_IO01_config.direction = gpio_output;
    GPIO5_IO01_config.output = 1;
    IOMUXC_SetPinMux(IOMUXC_SNVS_SNVS_TAMPER1_GPIO5_IO01,0);
    IOMUXC_SetPinConfig(IOMUXC_SNVS_SNVS_TAMPER1_GPIO5_IO01,0XFF);
    gpio_init(GPIO5 , 1 , &GPIO5_IO01_config);

}

/*beep发声函数*/
void beep_open(void){
    gpio_write_pin(GPIO5 , 1 , 0);
}

/*beep关闭函数*/
void beep_close(void){
    gpio_write_pin(GPIO5 , 1 , 1);
}